<!doctype html>
<html lang="zh-CN">

<head>
    <!-- 必须的 meta 标签 -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap 的 CSS 文件 -->
    <!-- <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" > -->
    <link rel="stylesheet" href="/eng/css/bootstrap.min.css" >
    <!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"> -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

    <title>英语错题</title>
    <script>
        function toAddpage(){
            var fm = document.getElementById("form");
            fm.action="/eng/addEnglish";
            return true;
        }
        function doSearch(){
            var fm = document.getElementById("form");
            fm.action="/eng/searchEnglish";
            return true;
        }
        function clearAll(){
            $("#xueqi").val("0");
            $("#zhangjie").val("0");
            $("#zhangjieming").val("");
            $("#zsd").val("");
            $("#fenlei1").val("0");
            $("#fenlei2").val("0");
            $("#fenlei3").val("0");
            $("#biji").val("");
            $("#chuchu").val("");
            return false;
        }
        // 章节选择
        $(document).ready(function(){
            // $("#zhangjie").change(function(){
            //     var zjID=$("#zhangjie").val();
            //     $.ajax({
            //         type:"get",
            //         url:"/eng/engzjNm",
            //         data:{zjID:zjID},
            //         success:function(data){
            //             $("#zhangjieming").val(data);
            //         }
            //     }     
            //     )
            // });
            // $("#zhuijiabtn").click(function(){
            //     alert();
            //     var fm = document.getElementById("form");
            //     fm.action="/eng/addEnglish";
            //     return true;
            // })
        });
    </script>
    

    <hr style="border:3 double #7e0e0e" width="100%" color=#987cb9 SIZE=3>
</head>

<body>
    <nav class="navbar navbar-expand-lg navbar-light bg-white border-bottom py-0 fixed-top">
        <div class="col-md-12" style="text-align: right;">
            <a class="text-muted"  href="../eng/menu.html">←返回主画面</a>
        </div>
    </nav>
    <div class="card text-dark bg-light">
        <div class="card-header">
            <h4 class="card-title text-info">英语错题查询页面</h4>
            <form class="form-horizontal" id="form" role="form" action="/eng/englishSearch" method="get">
                <div class="row">
                    <div class="col-md-2">
                        <div class="form-group row">
                            <label for="xueke" class="col-sm-4 col-form-label">学科:</label>
                            <div class="col-sm-8">
                                <input type="text" name="xueke" id="xueke" class="form-control" placeholder="" th:value="英语" disabled="false">
                                <input type="hidden" name="hidxueke" value="英语">
                            </div>
                        </div>
                    </div> 
                    <div class="col-md-2">
                        <div class="form-group row">
                            <label for="xueqi" class="col-sm-4 col-form-label">学期:</label>
                            <div class="col-sm-8">
                                <select name="xueqi" id="xueqi" class="form-control">
                                    <option value="0">----请选择----</option>
                                    <option value="高一（上）"  th:selected="${condEntity.xueqi} eq '高一（上）'">高一（上）</option>
                                    <option value="高一（下）"  th:selected="${condEntity.xueqi} eq '高一（下）'">高一（下）</option>
                                    <option value="高二（上）"  th:selected="${condEntity.xueqi} eq '高二（上）'">高二（上）</option>
                                    <option value="高二（下）"  th:selected="${condEntity.xueqi} eq '高二（下）'">高二（下）</option>
                                    <option value="高三（上）"  th:selected="${condEntity.xueqi} eq '高三（上）'">高三（上）</option>
                                    <option value="高三（下）"  th:selected="${condEntity.xueqi} eq '高三（下）'">高三（下）</option>
                                </select>
                            </div> 
                        </div>
                    </div> 
                    <div class="col-md-2">
                        <div class="form-group row">
                            <label for="zhangjie" class="col-sm-4 col-form-label">章节:</label>
                            <div class="col-sm-8">
                                <select name="zhangjie" id="zhangjie" class="form-control" >
                                    <option value="0">----请选择----</option>
                                    <option th:each="zj: ${allZj}" th:value="${zj}"  th:selected="${condEntity.zhangjie} eq ${zj}" th:text="${zj}" >函数1</option>
                                </select>
                            </div> 
                        </div>
                    </div>
                    <div class="col-md-1">
                        <button class="btn btn-primary btn-sm btn-block" type="button" onclick="return clearAll()">Clear</button>  
                    </div>                                                            
                </div>

                <div class="row">
                    <div class="col-md-2">
                        <div class="form-group row">
                            <label for="fenlei1" class="col-sm-4 col-form-label">大分类:</label>
                            <div class="col-sm-8">
                                <select name="fenlei1" id="fenlei1" class="form-control">
                                    <option value="0">----请选择----</option>
                                    <option value="校内习题"  th:selected="${condEntity.fenlei1} eq '校内习题'">校内习题</option>
                                    <option value="校外习题"  th:selected="${condEntity.fenlei1} eq '校外习题'">校外习题</option>
                                    <option value="自主练习"  th:selected="${condEntity.fenlei1} eq '自主练习'">自主练习</option>
                                </select>
                            </div> 
                        </div>
                    </div> 
                    <div class="col-md-2">
                        <div class="form-group row">
                            <label for="fenlei2" class="col-sm-4 col-form-label">中分类:</label>
                            <div class="col-sm-8">
                                <select name="fenlei2" id="fenlei2" class="form-control">
                                    <option value="0">----请选择----</option>
                                    <option value="客观原因"  th:selected="${condEntity.fenlei2} eq '客观原因'">客观原因</option>
                                    <option value="主观原因"  th:selected="${condEntity.fenlei2} eq '主观原因'">主观原因</option>
                                    <option value="其他原因"  th:selected="${condEntity.fenlei2} eq '其他原因'">其他原因</option>
                                </select>
                            </div> 
                        </div>
                    </div> 
                    <div class="col-md-2">
                        <div class="form-group row">
                            <label for="fenlei3" class="col-sm-4 col-form-label">小分类:</label>
                            <div class="col-sm-8">
                                <select name="fenlei3" id="fenlei3" class="form-control">
                                    <option value="0">----请选择----</option>
                                    <option value="计算马虎" th:selected="${condEntity.fenlei3} eq '计算马虎'">计算马虎</option>
                                    <option value="公式忘记"  th:selected="${condEntity.fenlei3} eq '公式忘记'">公式忘记</option>
                                    <option value="审题不仔细"  th:selected="${condEntity.fenlei3} eq '审题不仔细'">审题不仔细</option>
                                    <option value="定理记错"  th:selected="${condEntity.fenlei3} eq '定理记错'">定理记错</option>
                                    <option value="题未理解"  th:selected="${condEntity.fenlei3} eq '题未理解'">题未理解</option>
                                    <option value="完全没有思路"  th:selected="${condEntity.fenlei3} eq '完全没有思路'">完全没有思路</option>
                                    <option value="不知道考点"  th:selected="${condEntity.fenlei3} eq '不知道考点'">不知道考点</option>
                                    <option value="推导一半受阻"  th:selected="${condEntity.fenlei3} eq '推导一半受阻'">推导一半受阻</option>
                                    <option value="公式运用不清"  th:selected="${condEntity.fenlei3} eq '公式运用不清'">公式运用不清</option>
                                    <option value="老师没讲"  th:selected="${condEntity.fenlei3} eq '老师没讲'">老师没讲</option>                                
                                    <option value="其他原因"  th:selected="${condEntity.fenlei3} eq '其他原因'">其他原因</option> 
                                </select>             
                            </div>  
                        </div>
                    </div>  
                    <div class="col-md-1">
                        <button class="btn btn-primary btn-sm btn-block" type="sbumit" id="zhuijiabtn" onclick="return toAddpage()">追加</button>   
                    </div>                                                                                        
                </div>                        
            
                <div class="row">
                    <div class="col-md-2">
                        <div class="form-group row">
                            <label for="zsd" class="col-sm-4 col-form-label">知识点:</label>
                            <div class="col-sm-8">
                                <input type="text" name="zsd" id="zsd" class="form-control" placeholder="考试要点之类"  th:value="${condEntity.zsd}">
                            </div>  
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group row">
                            <label for="biji" class="col-sm-4 col-form-label">笔记:</label>
                            <div class="col-sm-8">
                                <input type="text" name="biji" id="biji" class="form-control" placeholder="自己总结复习结论等"  th:value="${condEntity.biji}">
                            </div> 
                        </div>
                    </div>
                    <div class="col-md-2">
                        <div class="form-group row">
                            <label for="chuchu" class="col-sm-4 col-form-label">错题出处:</label>
                            <div class="col-sm-8">
                                <input type="text" name="chuchu" id="chuchu" class="form-control" placeholder="输入书籍or练习册名称等"  th:value="${condEntity.chuchu}">
                            </div>  
                        </div>
                    </div> 
                    <div class="col-md-1">
                        <button class="btn btn-primary btn-sm btn-block" type="submit" onclick="return doSearch()">查询</button>   
                    </div>                                                                                        
                </div>
            </form>
        </div>
    </div>
    <p></p>  
    <p></p>  
    <b-div>
        <th:block th:if="${english} != null">
            <b-div>
                <nav aria-label="Page navigation">
                    <ul class="pagination">
                        <li th:class= "${english.isFirstPage}?'page-item disabled':'page-item'"><a class="page-link"
                                th:href="@{/eng/searchEnglish(pageNm=${english.prePage})}">Previous</a></li>
                        <th:block th:each=" nav : ${english.navigatepageNums}">
                            <li th:class="${nav == english.pageNum}?'page-item active':''">
                                <a class="page-link" th:href="@{/eng/searchEnglish(pageNm=${nav})}"
                                    th:text="${nav}"></a>
                            </li>
                        </th:block>
                        <li th:class= "${english.isLastPage}?'page-item disabled':'page-item'"><a class="page-link"
                                th:href="@{/eng/searchEnglish(pageNm=${english.nextPage})}">Next</a></li>
                    </ul>
                </nav>
                <table class="table table-striped">
                    <thead class="thead-light" style="overflow-x: auto; background-color: rgb(243, 245, 243);">
                        <tr>
                            <th width="4%">序号</th>
                            <th width="4%">学科</th>
                            <th width="5%">学期</th>
                            <th width="5%">章节</th>
                            <th width="6%">知识点</th>
                            <th width="5%">大分类</th>
                            <th width="5%">中分类</th>
                            <th width="5%">小分类</th>
                            <th width="10%">出处</th>
                            <th width="15%">笔记</th>
                            <th width="4%">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr th:each="english,UserStat: ${english.list}" style="white-space: nowrap;">
                            <td th:text="${UserStat.index}+1">1</td>
                            <td th:text="${english.xueke}">2</td>
                            <td th:text="${english.xueqi}">3</td>
                            <td th:text="${english.zhangjie}">4</td>
                            <td th:text="${english.zsd}">5</td>
                            <td th:text="${english.fenlei1}">6</td>
                            <td th:text="${english.fenlei2}">7</td>
                            <td th:text="${english.fenlei3}">8</td>
                            <td th:text="${english.chuchu}">9</td>
                            <td th:text="${english.biji}">10</td>
                            
                            <td><a th:href="@{|/eng/searchEnglishByID?pkey=${english.id}|}" target="_blank">详细</a></td>
                            
                            <td hidden id="pkey" th:text="${english.id}"></td> 
                        </tr>
                    </tbody>
                </table>
                <nav aria-label="Page navigation">
                    <ul class="pagination">
                        <li th:class= "${english.isFirstPage}?'page-item disabled':'page-item'"><a class="page-link"
                                th:href="@{/eng/searchEnglish(pageNm=${english.prePage})}">Previous</a></li>
                        <th:block th:each=" nav : ${english.navigatepageNums}">
                            <li th:class="${nav == english.pageNum}?'page-item active':''">
                                <a class="page-link" th:href="@{/eng/searchEnglish(pageNm=${nav})}"
                                    th:text="${nav}"></a>
                                
                            </li>
                        </th:block>
                        <li th:class= "${english.isLastPage}?'page-item disabled':'page-item'"><a class="page-link"
                                th:href="@{/eng/searchEnglish(pageNm=${english.nextPage})}">Next</a></li>
                    </ul>
                </nav>
            </b-div>
        </th:block>
    </b-div>


    <!-- JavaScript 文件是可选的。从以下两种建议中选择一个即可！ -->



    <!-- 选项 2：Popper 和 Bootstrap 的 JS 插件各自独立 -->
    <!--
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
    -->
</body>

</html>